package day11HomeWork;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class NewForDemo {
    public static void main(String[] args) {
        String[] arr = {"one","tow","trhee","four","five"};
        for(String e:arr){
            System.out.println(e);
        }
        Collection<String> c = new ArrayList<>();
        c.add("one");
        c.add("two");
        c.add("three");
        c.add("four");
        c.add("five");
        Iterator<String> w = c.iterator();
        while (w.hasNext()){
            w.next();
            System.out.println(w);
        }
        for (String it: c){
            System.out.println(it);
        }

    }

}
